<?php
//$start = microtime(true);
require_once 'protected/vendor/mirage/Mirage/Web.php';
require_once 'protected/vendor/mirage/Mirage/Autoload.php';
\Mirage\Autoload::register();

require_once 'protected/config/AppKernel.php';
$modulePath = __DIR__.'/protected/modules';
Mirage\Web::app()
        ->setBaseAppPath(__DIR__.'/protected')
        ->setKernel(new AppKernel())
        ->setDefaultModuleID('front')
        ->setModulePath($modulePath)
        ->setBasePublicPath(__DIR__)
        ->run();
//echo '<br />'.(microtime(true) - $start) .' s';
//echo '<br />'.memory_get_usage() / 1024 .' kb';
//\Mirage\Util\Debug::dump($_GET);


//require_once 'protected/vendor/mirage/Mirage/Router.php';
//
//$router = new Router();
//$routes = array(
//    '/user/update/:w'=>'User/update',
//);
//$router->setModules(array('frontend','backend','cashier','moviemanager'));
//$router->setDefaultModuleID('frontend');
//$router->setRoutes($routes);
//$router->init();
//$router->run();
//
//echo '<br /> MODULE ID: ' . $router->getModuleID();
//echo '<br /> CONTROLLER ID: '.$router->getControllerID();
//echo '<br /> ACTION ID: '. $router->getActionID();

